package xx.pro.consumer04;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import xx.pro.common.MessageInfo;

import java.util.Date;
import java.util.Random;


@Component
@RabbitListener(queues = "q_seq2")
public class Consumer {

    @RabbitHandler
    public void onMessage(Object message) {
        System.out.println(new Date().getTime()+" c22:" + message);
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
